#!/bin/sh

appName="meeting"

cd ../..
# path:./meeting

# linux
mkdir -p ../../../../10-common/version/release/linux/webApps/
rm -rf ../../../../10-common/version/release/linux/webApps/${appName}.bin
\cp -av ../../web-server/release/${appName}.bin ../../../../10-common/version/release/linux/webApps/
if [ -f ../../web-server/release_brand/${appName}_default.bin ]; then
    rm -rf ../../../../10-common/version/release/linux/webApps/${appName}
    mkdir -p ../../../../10-common/version/release/linux/webApps/${appName}
    \cp -av ../../web-server/release_brand/${appName}*.bin ../../../../10-common/version/release/linux/webApps/${appName}
fi

# linux_arm_ft64
mkdir -p ../../../../10-common/version/release/linux_arm_ft64/webApps/
rm -rf ../../../../10-common/version/release/linux_arm_ft64/webApps/${appName}.bin
\cp -av ../../web-server/release/${appName}.bin ../../../../10-common/version/release/linux_arm_ft64/webApps/
if [ -f ../../web-server/release_brand/${appName}_default.bin ]; then
    rm -rf ../../../../10-common/version/release/linux_arm_ft64/webApps/${appName}
    mkdir -p ../../../../10-common/version/release/linux_arm_ft64/webApps/${appName}
    \cp -av ../../web-server/release_brand/${appName}*.bin ../../../../10-common/version/release/linux_arm_ft64/webApps/${appName}
fi

# linux_arm_ft64_sm
appName="meeting_sm"
mkdir -p ../../../../10-common/version/release/linux_arm_ft64_sm/webApps/
rm -rf ../../../../10-common/version/release/linux_arm_ft64_sm/webApps/${appName}.bin
\cp -av ../../web-server/release/${appName}.bin ../../../../10-common/version/release/linux_arm_ft64_sm/webApps/
if [ -f ../../web-server/release_brand/${appName}_default.bin ]; then
    rm -rf ../../../../10-common/version/release/linux_arm_ft64_sm/webApps/${appName}
    mkdir -p ../../../../10-common/version/release/linux_arm_ft64_sm/webApps/${appName}
    \cp -av ../../web-server/release_brand/${appName}*.bin ../../../../10-common/version/release/linux_arm_ft64_sm/webApps/${appName}
fi
